import * as NAME from '../common/config/constant'
import {userService} from '#/service'
export const saveUserInfo = function ({commit}, userInfo) {
  commit(NAME.USER_INFO, userInfo)
}
export const restUser= async function ({commit}) {
   return await userService.personInfo({
     success(res){
       if(res.code===0){
         commit(NAME.USER_INFO, res.data)
       }

     }
   })
}
export const changeLoading = function ({commit}, loading) {
  commit(NAME.LOADING, loading)
}
